package com.xej.seat.vo;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import org.apache.ibatis.type.Alias;

import com.xej.seat.model.SeatingType;
import com.xej.seat.util.excel.annotation.ExcelField;

/**
 * 客户会员信息
 * @author lisheng
 *
 */
@Alias("customer")
public class Customer implements Comparable<Customer>, Serializable {
	private static final long serialVersionUID = -5868986790505169792L;
	private Integer cusId;    // 人员序号
	private String instName; // 机构名
	private Double assets;    // 资产规模
	private String isMember; // 是否成员行
	private String isChairm; // 是否主席行
	private String cusName;  // 姓名
	private String cusGender;// 性别
	private String cusPosit; // 职务
	private Double cusLevel; // 职级
	private SeatingType seatingType; //排座类型
	private Date createTime; //创建时间
	private Double cweight;
	private List<Tag> tags; //标签
	
	@Override
	public int compareTo(Customer otherCustomer) {
		BigDecimal thisWeight = BigDecimal.valueOf(this.getCweight());
		BigDecimal otherWeight = BigDecimal.valueOf(otherCustomer.getCweight());
		return otherWeight.compareTo(thisWeight);
	}
	@ExcelField(title="人员序号", align=1, sort=1)
	public Integer getCusId() {
		return cusId;
	}

	public void setCusId(Integer cusId) {
		this.cusId = cusId;
	}
	
	@ExcelField(title="机构名称", align=1, sort=10)
	public String getInstName() {
		return instName;
	}

	public void setInstName(String instName) {
		this.instName = instName;
	}

	@ExcelField(title="资产规模", align=1, sort=20)
	public Double getAssets() {
		return assets;
	}

	public void setAssets(Double assets) {
		this.assets = assets;
	}

	@ExcelField(title="是否成员行", align=1, sort=30)
	public String getIsMember() {
		return isMember;
	}

	public void setIsMember(String isMember) {
		this.isMember = isMember;
	}
	
	@ExcelField(title="是否主席行", align=1, sort=40)
	public String getIsChairm() {
		return isChairm;
	}

	public void setIsChairm(String isChairm) {
		this.isChairm = isChairm;
	}

	@ExcelField(title="姓名", align=1, sort=50)
	public String getCusName() {
		return cusName;
	}

	public void setCusName(String cusName) {
		this.cusName = cusName;
	}

	@ExcelField(title="性别", align=1, sort=60)
	public String getCusGender() {
		return cusGender;
	}

	public void setCusGender(String cusGender) {
		this.cusGender = cusGender;
	}

	@ExcelField(title="职务", align=1, sort=70)
	public String getCusPosit() {
		return cusPosit;
	}

	public void setCusPosit(String cusPosit) {
		this.cusPosit = cusPosit;
	}

	@ExcelField(title="职级", align=1, sort=80)
	public Double getCusLevel() {
		return cusLevel;
	}

	public void setCusLevel(Double cusLevel) {
		this.cusLevel = cusLevel;
	}

	public SeatingType getSeatingType() {
		return seatingType;
	}

	public void setSeatingType(SeatingType seatingType) {
		this.seatingType = seatingType;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	public Double getCweight() {
		return cweight;
	}

	public void setCweight(Double cweight) {
		this.cweight = cweight;
	}

	public List<Tag> getTags() {
		return tags;
	}

	public void setTags(List<Tag> tags) {
		this.tags = tags;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("Customer [cusId=");
		builder.append(cusId);
		builder.append(", instName=");
		builder.append(instName);
		builder.append(", assets=");
		builder.append(assets);
		builder.append(", isMember=");
		builder.append(isMember);
		builder.append(", isChairm=");
		builder.append(isChairm);
		builder.append(", cusName=");
		builder.append(cusName);
		builder.append(", cusGender=");
		builder.append(cusGender);
		builder.append(", cusPosit=");
		builder.append(cusPosit);
		builder.append(", cusLevel=");
		builder.append(cusLevel);
		builder.append(", seatingType=");
		builder.append(seatingType);
		builder.append(", createTime=");
		builder.append(createTime);
		builder.append(", cweight=");
		builder.append(cweight);
		builder.append(", tags=");
		builder.append(tags);
		builder.append("]");
		return builder.toString();
	}
	
}
